using System.Data.Entity.ModelConfiguration;
using System.ComponentModel.DataAnnotations;

namespace DemoApp.DataAccess 
{
  public partial class PersonEntityConfiguration 
    : EntityTypeConfiguration<Person>
  {
    public PersonEntityConfiguration()
    {
      HasEntitySetName(@"People");
      Map(map => {
        map.ToTable(@"People");
      });
 

      Property(e => e.FirstName) 
        .HasMaxLength(40);

      Property(e => e.LastName) 
        .HasMaxLength(60);

      Property(e => e.Email) 
        .HasMaxLength(260);
 
    }
  }
}
